﻿using System;
using System.ComponentModel;
using Loki;
using Loki.UI;
using Luna.Model;

namespace Luna.UI.Project
{
    public class DisplayableProject : Displayable<LunaModel>
    {
        #region  ID
        private static PropertyChangedEventArgs _IDChangeArgs = ObservableHelper.CreateArgs<DisplayableProject>(x => x.ID);

        private Guid _ID;

        public Guid ID
        {
            get
            {
                return _ID;
            }

            set
            {
                if (value != _ID)
                {
                    _ID = value;
                    NotifyChanged(_IDChangeArgs);
                }
            }
        }
        #endregion

        #region  Name
        private static PropertyChangedEventArgs _NameChangeArgs = ObservableHelper.CreateArgs<DisplayableProject>(x => x.Name);

        private string _Name;

        public string Name
        {
            get
            {
                return _Name;
            }

            set
            {
                if (value != _Name)
                {
                    _Name = value;
                    NotifyChanged(_NameChangeArgs);
                }
            }
        }
        #endregion

        #region  Description
        private static PropertyChangedEventArgs _DescriptionChangeArgs = ObservableHelper.CreateArgs<DisplayableProject>(x => x.Description);

        private string _Description;

        public string Description
        {
            get
            {
                return _Description;
            }

            set
            {
                if (value != _Description)
                {
                    _Description = value;
                    NotifyChanged(_DescriptionChangeArgs);
                }
            }
        }
        #endregion

        #region  AllocatedAmount
        private static PropertyChangedEventArgs _AllocatedAmountChangeArgs = ObservableHelper.CreateArgs<DisplayableProject>(x => x.AllocatedAmount);

        private decimal? _AllocatedAmount;

        public decimal? AllocatedAmount
        {
            get
            {
                return _AllocatedAmount;
            }

            set
            {
                if (value != _AllocatedAmount)
                {
                    _AllocatedAmount = value;
                    NotifyChanged(_AllocatedAmountChangeArgs);
                }
            }
        }
        #endregion

        #region  IncomeAmount
        private static PropertyChangedEventArgs _IncomeAmountChangeArgs = ObservableHelper.CreateArgs<DisplayableProject>(x => x.IncomeAmount);

        private decimal? _IncomeAmount;

        public decimal? IncomeAmount
        {
            get
            {
                return _IncomeAmount;
            }

            set
            {
                if (value != _IncomeAmount)
                {
                    _IncomeAmount = value;
                    NotifyChanged(_IncomeAmountChangeArgs);
                }
            }
        }
        #endregion

        #region  OutcomeAmount
        private static PropertyChangedEventArgs _OutcomeAmountChangeArgs = ObservableHelper.CreateArgs<DisplayableProject>(x => x.OutcomeAmount);

        private decimal? _OutcomeAmount;

        public decimal? OutcomeAmount
        {
            get
            {
                return _OutcomeAmount;
            }

            set
            {
                if (value != _OutcomeAmount)
                {
                    _OutcomeAmount = value;
                    NotifyChanged(_OutcomeAmountChangeArgs);
                }
            }
        }
        #endregion
    }
}
